import router from '@/router'

router.beforeEach(async (to, from, next) => {
    const whiteList = ['country', 'province', 'city', 'area']
    const urlNav = sessionStorage.getItem('urlNav')
    if (!urlNav) sessionStorage.setItem('urlNav', ['全国'])
    if (whiteList.includes(to.name)) {
        next()
    } else {
        next(`/`)
    }
})

router.afterEach(() => {
    // done
})

